import request from '@/utils/request'
// 获取文章列表
export const reqGetlist = (current, pageSize) => {
  return request({
    method: 'get',
    url: '/admin/interview/query',
    params: {
      current,
      pageSize
    }
  })
}
// 新增文章列表
export const reqAddArticle = (data) => {
  return request({
    method: 'post',
    url: '/admin/interview/create',
    data
  })
}
// 删除文章列表
export const reqDelArticle = id => {
  return request({
    method: 'delete',
    url: '/admin/interview/remove',
    data: { id } // 接口要求请求体body带参数
  })
}
// 查询单个文章
export const reqGetArticleInfo = id => {
  return request({
    method: 'get',
    url: '/admin/interview/show',
    params: { id }
  })
}
// 更新文章
export const reqUpdateArticle = data => {
  return request({
    method: 'put',
    url: '/admin/interview/update',
    data
  })
}
